//
//  Instrument.h
//  ACGPicture
//
//  Created by mac on 2018/1/20.
//  Copyright © 2018年 Mephsito. All rights reserved.
//

///---------
///工具常量宏
///---------

#ifndef Instrument_h
#define Instrument_h

///---------
/// App Info
///---------
#define NavTempApplicationVersionKey @"NavTempApplicationVersionKey"
#define MRC_APP_NAME    ([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"])
#define MRC_APP_VERSION ([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"])
#define MRC_APP_BUILD   ([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"])

///-----
/// Tool
///-----
#define XZdefaults  [NSUserDefaults standardUserDefaults]
#define XZNotificationCenter [NSNotificationCenter defaultCenter]

///-----------------------
///字体全局定义方法和定义的字体
///-----------------------
#define XZFont(a) [UIFont systemFontOfSize:a]
#define contentFont ((kScreenWidth>=375)?14:13)

///-----------
///屏幕宽度和高度
///-----------
#define kScreenBound [UIScreen mainScreen].bounds


///----
/// 函数
///----

///懒加载可变数组
#define LazyLoadMethod(variable)    \
- (NSMutableArray *)variable \
{   \
if (!_##variable)  \
{   \
_##variable = [NSMutableArray array];  \
}   \
return _##variable;    \
}



///---------
/// DEBUG打印
///---------

#ifdef DEBUG

#define NSLog(FORMAT, ...) fprintf(stderr,"%s:%d\t%s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);


#else

#define NSLog(...)

#endif


#endif /* Instrument_h */
